<?php
class PaymentCustomer extends PaymentData{
	
	public $id;
	public $email;
	public $paymentsource = '';
	public $customerAllInfo;
	
	public function __construct(){
		$this->setName('customer');
	}
	
	public function setCustomerInfo($customerinfo){
		$this->id 		= $customerinfo['id'];
		$this->email 	= $customerinfo['email'];
		$this->paymentsource	= $customerinfo['paymentsource'];
		$this->customerAllInfo = $customerinfo;
	}
	
	public function toArray(){
		return array(
			'id' 		=> $this->id,
			'email'		=> $this->email,
			'paymentsource' => $this->paymentsource,
			'customerAllInfo' => $this->customerAllInfo,
		);
	}
	
	public function vaild(){
		if (empty($this->id)){
			$this->setErrorMessage('customerId','Customer Id NO');
		}
		return $this->vaild;
	}
	
// 	public function Vald(){
// 		if(empty($this->id)){
// 		}
// 	}
}